package com.ict.ms.area.service.api.impl;

import org.springframework.stereotype.Service;

import com.ict.ms.area.facade.api.ICountAllService;
import com.ict.ms.area.service.dao.ICountAllDao;

import javax.annotation.Resource;

/**
 * Created by Administrator on 2017/5/25.
 */
@Service("countAllService") 
public class CountAllService implements  ICountAllService {
    @Resource
    ICountAllDao dao;

    public Object getCount(int mode) {
        int count = 0;
        try {
            if (mode == 0) {
                count = dao.getCountMode0(mode);
            } else {
                count = dao.getCountMode1(mode);
            }
        } catch (Exception e) {
            System.out.println("数据库操作错误" + e);
        }
        return count;
    }
}
